﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ECGSite.Master" AutoEventWireup="true"
    CodeBehind="DoctorPage.aspx.cs" Inherits="ECGWeb.WebForm4" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/Controls/CommentDataTable.ascx" TagName="commentDataTable" TagPrefix="uc" %>
<%@ Register Src="~/Controls/PatientShortDataTable.ascx" TagName="patientShortDataTable"
    TagPrefix="uc" %>
<%@ Register Src="~/Controls/ECGDrawPanel.ascx" TagName="ecgDrawPanel" TagPrefix="uc" %>
<%@ Register Src="~/Controls/PatientInformation.ascx" TagName="patientInformation"
    TagPrefix="uc" %>
<%@ Register Src="~/Controls/UnusualSignalList.ascx" TagName="unusualList" TagPrefix="uc" %>
<%@ Register Src="~/Controls/ToolBox.ascx" TagName="toolBox" TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rightSiteTool" runat="server">
    <script src="Scripts/DoctorPageScript.js" type="text/javascript"></script>
    <link href="Style/DoctorPage.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        var dataArr;
        var offset;
        var check;
        var columnCheck;
        var newLeadLength;
        var oldLeadLength;
        var oldMaxX;
        var newMaxX;
        var request = null;
        var haveAnOtherRequest = false;

        //Dùng pageLoad() thay vì $(document).ready() vì sau khi postback thì không còn  
        //nhận được sự kiện click nữa do bị hủy các đối tượng DOM
        function pageLoad() {
            //Sự kiện khi click một dòng của gridview1
            $('.RowStyle').click(function () {
                //Dịch trang đến vị trí vẽ
                $('html, body').animate({
                    scrollTop: $("#recordDetail").offset().top
                }, 800);
                recordid = $(this).children().eq(0).html();
                //loadData12($(this).children().eq(0).html());

                //Thu nghiep load tung phan
                if (request != null) {
                    var executor = request.get_executor();
                    if (executor.get_started()) {
                        executor.abort();
                    }
                }
                loadAFrame(recordid);
                $(".unusual_div").remove();
            });

            //Sự kiện khi click một dòng của rs_gridview
            //sử dụng unbind để tránh bị fire nhiều event trong một lần click- chưa hiểu nguyên nhân tại sao!
            $('.rightside_RowStyle').unbind("click").click(function () {
                showClientInfo($(this).children().eq(0).html());
                $(".unusual_div").remove();
                //alert($(this).children().eq(0).html());
            });

            $('.comment_RowStyle').click(function () {
                loadCmtContent($(this).children().eq(0).html(), recordid, $(this).children().eq(2).html());
            });

            $('.unusual_RowStyle').click(function () {
                x = $(this).children().eq(0).html() / 10;
                unusualScroll(x);
                PageMethods.LoadUnusualInfo($(this).children().eq(2).html(), OnSuccessLoadUnusualInfo);
                var startPoint = x;
                var uWidth = $(this).children().eq(1).html() / 10 - x;
                $(".unusual_div").remove();
                $(".canvasDiv4Doctor").prepend('<div class="unusual_div" style="width: 100px; height: 100%"></div>');
                $(".unusual_div").width(uWidth).css('left', x);
            });
        }

        function OnSuccessLoadUnusualInfo() {
            __doPostBack("gridview1", "");
        }

        function search(e) {

            //setTimeout để có thể bắt được giá trị của textbox sau khi keydown
            setTimeout(function () {
                PageMethods.searchPatient($("#rs_search_txtbox").attr('value'), $("#rs_ddl").val(), onSuccessSearch);
            }, 1);

            //alert($("#rs_search_txtbox").attr('value') + c);
            //alert(e.which);

            //Chống postback khi ấn enter
            var evt = (e) ? e : window.event;
            var key = (evt.keyCode) ? evt.keyCode : evt.which;

            if (key == 13) {
                if (e.preventDefault) {
                    e.preventDefault();
                }
                e.returnValue = false;
            }
        }

        function onSuccessSearch(result) {
            __doPostBack("rs_gridview", "");
        }

        $(function () {
            $("#clickme").toggle(function () {
                $(this).parent().animate({ right: '-280px' }, { queue: false, duration: 500 });
            }, function () {
                $(this).parent().animate({ right: '0px' }, { queue: false, duration: 500 });
            });
        });
    </script>    
    <input type="hidden" id="hidden1" name="hidden1" value="0" />
    <div>
        <asp:UpdatePanel ID="rs_updatePanel" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="rs_ddl" EventName="textchanged" />
                <%--<asp:AsyncPostBackTrigger ControlID="rs_search_txtbox" EventName="textchanged" />--%>
            </Triggers>
            <ContentTemplate>
                <div style="margin: 0 10px 10px 10px">
                    <asp:DropDownList runat="server" ID="rs_ddl" ClientIDMode="Static" CssClass="ddl1"
                        OnTextChanged="rs_ddlOnTextChanged" AutoPostBack="true">
                        <asp:ListItem Value="Bệnh nhân điều trị"></asp:ListItem>
                        <asp:ListItem Value="Bệnh nhân khác"></asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div style="margin: 0 10px 10px 10px">
                    <input type="text" id="rs_search_txtbox" class="rs_search_txtbox" onkeydown="return search(event);"
                        onpaste="return search(event);" oncut="return search(event);" />
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <uc:patientShortDataTable ID="patientShortDataTable" runat="server" />
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="childContent" runat="server">
    <script src="Scripts/jquery-1.7.2.js" type="text/javascript"></script>
    <link href="Style/PageStyle.css" rel="stylesheet" type="text/css" />
    <link href="Style/TableStyle.css" rel="stylesheet" type="text/css" />
    <link href="Style/ECGFloatingBox.css" rel="stylesheet" type="text/css" />
    <link href="Style/DoctorPage.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/contentSlideToggle.js" type="text/javascript"></script>
    <script src="Scripts/myDrawGraph.js" type="text/javascript"></script>
    <script src="Scripts/patientPageScript.js" type="text/javascript"></script>
    <script src="Scripts/DoctorPageScript.js" type="text/javascript"></script>
    <script type="text/javascript">
        var recordid; // Ma ban ghi khi bam xem chi tiet

        //var xArr = new Array(); //Dùng khi vẽ với dữ liệu giả
        //var yArr = new Array(); //Dùng khi vẽ với dữ liệu giả

        //Dùng với dữ liệu thật
        var dataArr = new Array();
        var graphorder;

        var zoomRatio = 1;

        var docID = '<%=Session["realID"].ToString() %>';
        var RecordID = recordid; //RecordID: ma ban ghi lay tu bang chua cac comment

        $(document).ready(function () {
            $('.canvasDiv4Doctor_Wrapper').mouseenter(function () {
                //$(this).children('span').fadeIn(200);
                $(this).children(".canvasDiv_dark_background").fadeIn(200);
            }).mouseout(function () {
                //$(this).children('span').fadeOut(200);
                $(this).children(".canvasDiv_dark_background").fadeOut(200);
            });
        });

        $(document).ready(function () {
            $('.canvasDiv4Doctor').click(function () {
                $('#darkBG1').toggle(500);
                $('#box1').toggle(500);

                ////////////////////////////////////////
                if ($("#hidden1").val() == '0') {
                    //Vẽ với dữ liệu giả 1 đạo trình                    
                    //drawGraph(xArr, yArr, 'ecgCanvas_box', 70);
                    //length = xArr.length;
                    //$('#canvas_scroll_box').width(xArr[length - 1]);
                    //$('#timeline_box').html("+ 0s");

                    //Vẽ với dữ liệu thật
                    switch (this.id) {
                        case "I":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 1);
                            break;
                        case "II":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 2);
                            break;
                        case "III":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 3);
                            break;
                        case "aVR":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 4);
                            break;
                        case "aVL":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 5);
                            break;
                        case "aVF":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 6);
                            break;
                        case "V1":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 7);
                            break;
                        case "V2":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 8);
                            break;
                        case "V3":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 9);
                            break;
                        case "V4":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 10);
                            break;
                        case "V5":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 11);
                            break;
                        case "V6":
                            drawGraph12(dataArr, 'ecgCanvas_box', 70, 12);
                            break;
                    }
                    leadLength = Math.round(dataArr.length / 13);
                    //Đối với bản ghi thời gian dạng số
                    //$('#canvas_scroll_box').width(Math.round(dataArr[13 * (leadLength - 1)] / 10));

                    //Đối với bản ghi thời gian dạng hh:mm:ss:mmm
                    $('#canvas_scroll_box').width(Math.round(dataArr[13 * (leadLength - 1)].split(':')[1] * 100));

                    $('#timeline_box').html("+ 0s");
                }
                else {
                }
            });
        });

        $(document).ready(function () {
            $('#close_box_btn').click(function () {
                $('#darkBG1').toggle(500);
                $('#box1').toggle(500);
                zoomRatio = 1;
                $('#zoomRatio').html("100%");
                if ($('#comment_table').hide() == false)
                    $('#comment_table').toggle(200);
                $('#specificCmt_div').text("");
                $('#specificCmt_div').css({ "background-color": "transparent" });
                clearGraph('ecgCanvas_box'); ///////////////////////
            });
        });

        function scrollECGDivBox(scrollBar) {
            $('#canvas_div_box').scrollLeft(scrollBar.scrollLeft * zoomRatio);
            $('#timeline_box').html("+ " + ($('#canvas_div_box').scrollLeft() * 0.01 / zoomRatio).toFixed(2) + "s");
        }

        function moveECGDivBoxLeft(x) {
            $('#canvas_div_box').scrollLeft($('#canvas_div_box').scrollLeft() - x * zoomRatio);
            $('#timeline_box').html("+ " + ($('#canvas_div_box').scrollLeft() * 0.01 / zoomRatio).toFixed(2) + "s");
        }

        function moveECGDivBoxRight(x) {
            $('#canvas_div_box').scrollLeft($('#canvas_div_box').scrollLeft() + x * zoomRatio);
            $('#timeline_box').html("+ " + ($('#canvas_div_box').scrollLeft() * 0.01 / zoomRatio).toFixed(2) + "s");
        }

        function zoom(x) {
            if (x == -1) {
                if (zoomRatio > 0.25) {
                    zoomRatio = zoomRatio - 0.25;
                }
            }

            if (x == 1) {
                if (zoomRatio < 1) {
                    zoomRatio = zoomRatio + 0.25;
                }
            }

            //drawZoomGraph(xArr, yArr, 'ecgCanvas_box', 70, zoomRatio);
            drawZoomGraph12(dataArr, 'ecgCanvas_box', 70, zoomRatio, graphorder);
            //length = xArr.length;
            //$('#canvas_scroll_box').width((xArr[length - 1]) * zoomRatio);
            leadLength = Math.round(dataArr.length / 13);

            //Đối với bản ghi thời gian dạng số
            //$('#canvas_scroll_box').width(zoomRatio * Math.round(dataArr[13 * (leadLength - 1)] / 10));

            //Đối với bản ghi thời gian dạng hh:mm:ss:mmm
            $('#canvas_scroll_box').width(zoomRatio * Math.round(dataArr[13 * (leadLength - 1)].split(':')[1] * 100));
            $('#zoomRatio').html((100 * zoomRatio) + "%");
        }

        var addable = false;

        function showCommentDiv() {
            $('#comment_table').toggle(200);
            if ($("#hidden1").val() == 0) {
                PageMethods.GetCommentContent('<%=Session["realID"].ToString() %>', recordid, OnSuccessLoadCommentDiv);
            }
        }

        function loadCmtContent(DocID, RID, datetime) {
            docID = DocID;
            RecordID = RID;
            $('#specificCmt_div').toggle(100);
            $('#specificCmt_div').toggle(400);
            $('#specificCmt_div').html(
                "<b style='color:#3366DB'>Bác sĩ: " + DocID + "</b>" +
                "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i style='color:#999999'>" + datetime + "</i>");
            if ('<%=Session["realID"].ToString() %>' == DocID) {
                $('#specificCmt_div').html($('#specificCmt_div').html() +
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick='EditCmt()'>Chỉnh sửa</a>");
            }
            else {
                if (addable) {
                    $('#specificCmt_div').html($('#specificCmt_div').html() +
                    "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick='AddNewCmt()'>Thêm mới</a>");
                }
            }
            PageMethods.GetCommentContent(DocID, RID, OnSuccessLoadComment);
        }

        var commentText;

        function OnSuccessLoadComment(response) {
            commentText = response;
            $('#specificCmt_div').css({ "background-color": "white" });
            $('#specificCmt_div').html(
            $('#specificCmt_div').html() +
            "<br>" +
            "<br>" +
            "<div id='cmt_content_div'>" +
            response +
            "</div>");
        }

        function OnSuccessLoadCommentDiv(response) {
            if (response == null) {
                addable = true;
                $('#specificCmt_div').css({ "background-color": "white" });
                $('#specificCmt_div').html(
                "&nbsp;&nbsp; <a id='addcmtlink' onclick='AddNewCmt()'>Thêm mới</a>" +
                "<br>" +
                "<br>" +
                "<div id='cmt_content_div'>" +
                "</div>");
            }
        }

        function AddNewCmt() {
            $('#cmt_content_div').html("<textarea id='cmt_content_edit' rows=8 cols=60></textarea>" +
                "<br />" +
                "<input type='button' value='Lưu nhận xét' id='cmt_add' onclick='AddComment()'/> &nbsp;" +
                "<input type='button' value='Hủy' id='add_cancel' class='cmt_btn' onclick='AddCommentCancel()'/> &nbsp;"
                );
        }

        function EditCmt() {
            $('#cmt_content_div').html("<textarea id='cmt_content_edit' rows=8 cols=60>" + $('#cmt_content_div').text() + "</textarea>" +
                "<br />" +
                "<input type='button' value='Lưu thay đổi' id='cmt_commit_change' onclick='CommentCommit()'/> &nbsp;" +
                "<input type='button' value='Xóa nhận xét' id='cmt_delete' class='cmt_btn'onclick='DeleteComment()'/> &nbsp;" +
                "<input type='button' value='Hủy' id='cmt_cancel' class='cmt_btn' onclick='CommentCancel()'/> &nbsp;"
                );
        }

        function DeleteComment() {
            if (confirm('Bạn thực sự muốn xóa comment này'))
                PageMethods.deleteComment(recordid, docID, onSuccessDeleteComment);
        }

        function CommentCancel() {
            $('#cmt_content_div').html(commentText);
        }

        function AddCommentCancel() {
            $('#cmt_content_div').html('');
        }
        //var realID = '<%=Session["realID"].ToString() %>';

        function AddComment() {
            commentText = $('#cmt_content_edit').val();
            PageMethods.AddComment(recordid, '<%=Session["realID"].ToString() %>', $('#cmt_content_edit').val(), OnSuccessAddComment);
        }

        function OnSuccessAddComment(response) {
            if (response != 0) {
                $('#specificCmt_div').html(
                "<b style='color:#3366DB'>Bác sĩ: " + '<%=Session["realID"].ToString() %>' + "</b>" +
                "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i style='color:#999999'>" + response + "</i>" +
                "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a onclick='EditCmt()'>Chỉnh sửa</a>" +
                "<br>" +
                "<br>" +
                "<div id='cmt_content_div'>" +
                $('#cmt_content_edit').val() +
                "</div>");
                addable = false;
                $('#addcmtlink').remove();
                __doPostBack("comment_gridview", "");
            }
            else {
                alert('Add Failed');
            }
        }

        function CommentCommit() {
            PageMethods.EditComment(recordid, docID, $('#cmt_content_edit').val(), OnSuccessEditComment);
        }

        function OnSuccessEditComment(response) {
            if (response == 1) {
                $('#cmt_content_div').html($('#cmt_content_edit').val());
                __doPostBack("comment_gridview", "");
            }
            else {
                alert('Edit Failed');
            }
        }

        function onSuccessDeleteComment(response) {
            if (response == "success") {
                $('#specificCmt_div').css({ "background-color": "white" });
                $('#specificCmt_div').html(
                "&nbsp;&nbsp; <a id='addcmtlink' onclick='AddNewCmt()'>Thêm mới</a>" +
                "<br>" +
                "<br>" +
                "<div id='cmt_content_div'>" +
                "</div>");
                __doPostBack("comment_gridview", "");
            }
            else {
                alert('Delete Failed');
            }
        }
    </script>
    <%--<textarea id="cmt_content_edit" rows=8 cols=60></textarea>--%>
    <%--<br />--%>
    <%--<input type="button" value="Lưu thay đổi" id="cmt_commit_change"/>
    <input type="button" value="Xóa nhận xét" id="cmt_delete" class="cmt_btn"/> 
    <input type="button" value="Hủy" id="cmt_cancel" class="cmt_btn"/> --%>
    <div id="darkBG1" class="dark-background">
    </div>
    <div id="box1" class="box">
        <center>
            <input type="button" id="close_box_btn" value="X" style="float: right" />
            <i style="color: White; padding-left: 185px;">Thời gian tính từ mép trái ngoài cùng</i>
            <div id="timeline_box">
                + 0s</div>
            <div>
                <div id="toolbox_box">
                    <p>
                        <b>Tool Box</b></p>
                    <input type="button" value="<<<<" onclick="moveECGDivBoxLeft(250)" />
                    <input type="button" value="<<" onclick="moveECGDivBoxLeft(100)" />
                    <input type="button" value="<" onclick="moveECGDivBoxLeft(20)" />
                    <input type="button" value=">" onclick="moveECGDivBoxRight(20)" />
                    <input type="button" value=">>" onclick="moveECGDivBoxRight(100)" />
                    <input type="button" value=">>>>" onclick="moveECGDivBoxRight(250)" />
                    <div style="margin: 10px 0 10px 0">
                        <b>Zoom</b>
                        <input style="margin: 0 10px 0 10px" type="button" value="+" onclick="zoom(1)" />
                        <input style="margin: 0 10px 0 0" type="button" value="-" onclick="zoom(-1)" />
                        <b id="zoomRatio">100%</b>
                    </div>
                </div>
                <div style="width: 600px; float: right">
                    <div style="height: 180px; width: 540px; background-color: White; padding: 30px 0 0 0;">
                        <div class="large-ecg-div" id="canvas_div_box">
                            <canvas class="large-ecg-canvas" id="ecgCanvas_box"></canvas>
                        </div>
                    </div>
                    <div id="scrollbar_box" onscroll="scrollECGDivBox(this)">
                        <canvas id="canvas_scroll_box"> </canvas>
                    </div>
                </div>
            </div>
            <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                <ContentTemplate>
                    <asp:Button ID="comment_btn" runat="server" Text="Comments" OnClientClick="showCommentDiv()"
                        OnClick="comment_btn_Click" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </center>
        <%--thẻ hidden dùng để kiểm tra việc vẽ thẻ ecgCanvas_box khi load lại trang bác sĩ với bệnh nhân khác--%>
        <table hidden="true" id="comment_table">
            <tr>
                <td>
                    <div class="comment_div" id="allCmt_div" style="width: 400px; height: 200px;">
                        <uc:commentDataTable ID="commentDataTable" runat="server" />
                    </div>
                </td>
                <td style="padding: 10px 5px 10px 5px;">
                    <div style="width: 600px; height: 220px;">
                        <div class="comment_div" id="specificCmt_div" style="width: 600px; padding: 20px 20px 20px 20px;
                            height: 200px; overflow: auto; overflow-y: hidden">
                        </div>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <table width="100%">
        <tr>
            <td width="40%">
                <div class="item">
                    <div class="div_head" id="info_div_head">
                        Thông tin bệnh nhân</div>
                    <hr noshade size="4" class="horizon_line" />
                    <div class="div_content" style="height: 235px">
                        <uc:patientInformation ID="patientInformation" runat="server" />
                    </div>
                </div>
            </td>
            <td width="60%">
                <div class="item">
                    <div class="div_head">
                        Lịch sử đo điện tim</div>
                    <hr noshade size="4" class="horizon_line" />
                    <div class="div_content" style="height: 235px">
                        <asp:UpdatePanel ID="updatePanel1" runat="server">
                            <Triggers>
                            </Triggers>
                            <ContentTemplate>
                                <asp:Label ID="Label1" Text="Lọc bản ghi" runat="server"></asp:Label>
                                <br />
                                <table width="500px">
                                    <tr>
                                        <td>
                                            <asp:Label ID="Label2" Text="Từ ngày: " runat="server"></asp:Label>&nbsp;
                                            <asp:TextBox ID="fromDateTxtBox" runat="server" AutoPostBack="true" OnTextChanged="fromDateTxtBox_TextChanged"></asp:TextBox>
                                            <asp:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="fromDateTxtBox">
                                            </asp:CalendarExtender>
                                        </td>
                                        <td>
                                            <asp:Label ID="Label3" Text="Đến ngày: " runat="server"></asp:Label>&nbsp;
                                            <asp:TextBox ID="toDateTxtBox" runat="server" AutoPostBack="true" OnTextChanged="toDateTxtBox_TextChanged"></asp:TextBox>
                                            <asp:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="toDateTxtBox">
                                            </asp:CalendarExtender>
                                        </td>
                                        <td>
                                            <asp:Label ID="notifyLbl" ClientIDMode="Static" Text="" runat="server" ForeColor="Red"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <br />
                        <asp:UpdatePanel ID="updatePanel2" runat="server">
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="gridview1" EventName="pageindexchanging" />
                                <asp:AsyncPostBackTrigger ControlID="gridview1" EventName="init" />
                                <asp:AsyncPostBackTrigger ControlID="gridview1" EventName="databinding" />
                            </Triggers>
                            <ContentTemplate>
                                <div class="doctor_record_gridview_div">
                                    <asp:GridView ID="gridview1" runat="server" AllowPaging="true" ClientIDMode="Static"
                                        AllowSorting="true" CssClass="GridViewStyle" GridLines="None" PageSize="5" AutoGenerateColumns="false"
                                        OnPageIndexChanging="gridview1_PageIndexChanging">
                                        <Columns>
                                            <asp:BoundField DataField="RecordID" HeaderText="Mã bản ghi" />
                                            <asp:BoundField DataField="DateTimeOfRecord" HeaderText="Ngày giờ" />
                                        </Columns>
                                        <RowStyle CssClass="RowStyle" />
                                        <EmptyDataRowStyle CssClass="EmptyRowStyle" />
                                        <PagerStyle CssClass="PagerStyle" />
                                        <SelectedRowStyle CssClass="SelectedRowStyle" />
                                        <HeaderStyle CssClass="HeaderStyle" />
                                        <EditRowStyle CssClass="EditRowStyle" />
                                        <AlternatingRowStyle CssClass="RowStyle" />
                                    </asp:GridView>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </div>
            </td>
        </tr>
    </table>
    <div class="item">
        <div class="div_head">
            Chi tiết lịch sử đo</div>
        <hr noshade size="4" class="horizon_line" />
        <div class="div_content" id="recordDetail">
            <table>
                <tr>
                    <td width="230px" valign="top" style="padding-top: 50px">
                        <table>
                            <tr>
                                <td>
                                    Mã bản ghi: <b>
                                        <label id="lbRecordID">
                                        </label>
                                    </b>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Tổng thời gian đo:
                                    <asp:Label ID="lbTotalTime" runat="server"></asp:Label>
                                </td>
                            </tr>
                        </table>
                        <uc:unusualList ID="unusualList" runat="server" ClientIDMode="Static" />
                        <hr />
                        <asp:UpdatePanel ID="uInfoUpdatePanel" runat="server" UpdateMode="Conditional">
                            <ContentTemplate>
                                <div id="uInfo_div">
                                    <asp:Label ID="uHR" runat="server" Text="HR: " /><br />
                                    <asp:Label ID="uR" runat="server" Text="R: " /><br />
                                    <asp:Label ID="uQR" runat="server" Text="QR: " /><br />
                                    <asp:Label ID="uRS" runat="server" Text="RS: " /><br />
                                    <asp:Label ID="uQRS" runat="server" Text="QRS: " />
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <hr />
                    </td>
                    <td>
                        <uc:ecgDrawPanel ID="ecgDrawPanel" runat="server" />
                    </td>
                </tr>
            </table>
            <%--  <p>Các thông số đo:</p>
            <p>----------------------------------------------------------</p>
            <p>----------------------------------------------------------</p>
            <p>----------------------------------------------------------</p>--%>
        </div>
    </div>
</asp:Content>
